var async=require('async');
var h=require('./helper');

//串行运行,times可以指定调用几次，并把结果合并到数组中返回

async.timesSeries(5, function (n,cb) {
    setTimeout(function () {
        h.log('n:',n);
        cb(null,n*10);
    },1000);
}, function (err, result) {
    console.log('err:',err);
    console.log('result:',result);
});